
public class subject2 {

	public static void main(String[] args) {
		int num = 1000;
		while (num <= 10000) {
			if (num % 7 == 0) {
				System.out.println(num + "");
			}
			num++;
		}

	}

}
